<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>表达式</title>
</head>
<body>
<h2>使用变量表达式</h2>
<div>
    <p th:text="${result}">result</p>
    <p th:text="${10+20}">result</p>
    <p th:text="${1>2}">result</p>
    <p th:text="${student01.name}">result</p>
    <p th:text="${student01.phoneNumber}">result</p>
    <p th:text="${session.student02.name}">result</p>
    <p th:text="${session.student02.phoneNumber}">result</p>
    <p th:text="${session.student02.address}">result</p>
</div>
<h2>使用*号表达式</h2>
<div th:object="${session.student02}">
    <p th:text="*{name}">result</p>
    <p th:text="*{phoneNumber}">result</p>
    <p th:text="*{address}">result</p>
</div>

<h2>使用消息表达式</h2>
<div>
    <p th:text="#{msg.welcome}"></p>
    <p th:text="#{msg.error}"></p>
</div>

</body>
</html>